package cn.hansfly.puzzle;

public class HelloGoodbye {
//	public static void main(String[] args) {
//		try{
//			System.out.println("Hello World");
//			System.exit(0);
//		}finally{
//			System.out.println("GoodBye World");
//		}
//	}
	
	public static void main(String[] args) {
		System.out.println("hello world");
		Runtime.getRuntime().addShutdownHook(
				new Thread(){
					public void run(){
						System.out.println("Goodbye world");
					}
				});
		
		System.exit(0);
	}
}
